<!DOCTYPE html>
<html xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="description" content="A fully featured admin theme which can be used to build CRM, CMS, etc.">
    <meta name="author" content="Coderthemes">
	
	<!-- jQuery  -->
    <script type="text/javascript" src="/static/plugins/jquery/jquery-3.6.0.min.js"></script>
	
	<!-- layui  -->
	<link rel="stylesheet" href="/static/plugins/layui/2.7.6/css/layui.css" media="all" />
	<script src="/static/plugins/layui/2.7.6/layui.js" charset="utf-8"></script>
	
</head>
<body>

	<form class="layui-form" id="formId" method="post">
			
		<table id="id_table"></table>
		<script th:inline="javascript">
		layui.use(['form', 'table'], function() {
			
			var $ = layui.$,
				table = layui.table,
				form = layui.form;
			
			table.render({
				elem: '#id_table',
				width: 660,
				height: 800,
				limit: 9999,
				id: 'id_table',
				rowDrag: {
					done: function(obj) {}
				},
				totalRow: true,
				cols: [ [
					{field: 'bid', title: '单号', width: 160,align:'center'},
					{field: 'createTime', title: '生成时间', width: 160,align:'center'},
					{field: 'updateTime', title: '完成时间', width: 160, align:'center'},
					{field: 'stateName', title: '状态', align:'center'},
					{field: 'ope', title: '操作', align:'center',templet:function(data){
						var returnStr = '';
						if(data.stateName == '已完成') {
							returnStr += '<a class="layui-btn layui-btn-xs layui-btn-normal" onclick="window.open(\'' + data.url + '\');"><i class="layui-icon layui-icon-export"></i>导出</a>';
						}
						return returnStr;
					}}
				] ],
				data: $.parseJSON(JSON.stringify([[${dto.rows}]])),
				done: function(res, curr, count){
				}
			});
		});
		</script>
	</form>

</body>
</html>
